package com.imooc.common.enums;

public enum ResultEnum {
    ERROR(99, "系统异常"),
    SUCCESS(00, "成功"),
    CANCEL_ORDER_SUCCESS(0, "取消订单成功"),
    PARAM_ERROR(1, "参数错误"),
    ORDER_OWANER_ERROR(2, "订单openid不一致"),
    PRODUCT_NOT_EXIST(10, "商品不存在"),
    PRODUCT_STOCK_ERROR(11, "库存不足"),
    ORDER_NOT_EXIST(12, "订单不存在"),
    ORDERDETAIL_NOT_EXIST(13, "订单详情不存在"),
    ORDERD_STATUS_ERROR(14, "订单状态不正确"),
    CART_NO_EMPTY(15, "购物车不能为空"),
    WEXIN_ERROR(16, "微信获取access_token异常"),
    ORDER_AMOUNT_NOT_MATCH_ERROR(17, "微信通知金额校验不通过"),
    PAY_STATUS_ERROR(18, "支付状态不正确"),
    PRODUCT_ON_SALE_ERROR(19, "商品已上架"),
    PRODUCT_OFF_SALE_ERROR(20, "商品已下架"),
    LOGIN_FAIL(21, "登录失败，用户信息不正确"),
    ;

    private Integer code;
    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
